import React, { Component } from 'react';
import { Button, Radio, Icon } from 'antd';

export default class ButtonSample extends Component {
  constructor(props) {
    super(props);
    this.state = {
      size: 'default',
    };
  }

  handleSizeChange = e => {
    this.setState({ size: e.target.value });
  };
  render() {
    const { size } = this.state;
    return (
      <div>
        <Radio.Group value={size} onChange={this.handleSizeChange}>
          <Radio.Button value="large">Large</Radio.Button>
          <Radio.Button value="default">Default</Radio.Button>
          <Radio.Button value="small">Small</Radio.Button>
        </Radio.Group>
        <hr />
        <div className="box">
          <Button type="primary" size={size}>
            Primary
          </Button>
        </div>
        <div className="box">
          <Button size={size}>Normal</Button>
        </div>
        <div className="box">
          <Button type="dashed" size={size}>
            Dashed
          </Button>
        </div>
        <div className="box">
          <Button type="danger" size={size}>
            Danger
          </Button>
        </div>
        <div className="box">
          <Button type="link" size={size}>
            Link
          </Button>
        </div>
        <div className="box">
          <Button type="primary" icon="download" size={size} />
        </div>
        <div className="box">
          <Button type="primary" shape="circle" icon="download" size={size} />
        </div>
        <div className="box">
          <Button type="primary" shape="round" icon="download" size={size} />
        </div>
        <div className="box">
          <Button type="primary" shape="round" icon="download" size={size}>
            Download
          </Button>
        </div>
        <div className="box">
          <Button type="primary" icon="download" size={size}>
            Download
          </Button>
        </div>
        <div className="box">
          <Button.Group size={size}>
            <Button type="primary">
              <Icon type="left" />
              Backward
            </Button>
            <Button type="primary">
              Forward
              <Icon type="right" />
            </Button>
          </Button.Group>
        </div>
      </div>
    );
  }
}
